//
//  HomeViewController.h
//  Blue-toothLight
//
//  Created by mazg on 15/6/17.
//  Copyright (c) 2015年 mazg. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol HomeViewControllerDelegate <NSObject>
-(void)changeDataWithAllPer:(NSMutableArray *)allPer andConnectedPer:(NSMutableArray *)connectedPer;
@end

@interface HomeViewController : UIViewController<UITableViewDataSource,UITableViewDelegate>

@property (nonatomic,strong) UITableView  *tableView;
@property (nonatomic,assign) BOOL isShowTableView;
@property (nonatomic,strong) NSMutableArray *allPerArr;
@property (nonatomic,strong) NSMutableArray *allConnectedPerArr;
@property (nonatomic,strong) NSMutableArray *perForShowArr;


@property (weak, nonatomic) IBOutlet UIView *setView;
@property (weak, nonatomic) IBOutlet UITextField *lightNameTextfield;
- (IBAction)setLightName:(id)sender;

@property (weak, nonatomic) IBOutlet UITableView *lightTableView;
@property (nonatomic,strong) NSMutableArray *lightTableViewList;

@property(nonatomic,weak)id<HomeViewControllerDelegate>delegate;

- (IBAction)showGroup:(id)sender;

- (IBAction)addLight:(id)sender;

- (IBAction)toggleSwitch:(id)sender;

@property (weak, nonatomic) IBOutlet UIButton *toggleAllLightBtn;

- (IBAction)toggleCellSwitch:(id)sender;
@end
